using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using cframework;
using Newtonsoft.Json;
namespace cframework
{

    [CreateAssetMenu(menuName = "cframework/ChannelUtil_FileSystem")]
    public class ChannelUtil_FileSystem : ChannelUtil
    {
        [Essential]
        public string path;
        public override bool Deploy(BuildPlayerSetting bps, string appPath, string destPath, string param, ref string downloadUrl)
        {
            if (bps.fileSystemUtil.Upload(appPath, $"{path}/{destPath}"))
            {
                downloadUrl = bps.fileSystemUtil.GetDownloadUrl() + $"/{path}/{destPath}";
                return true;
            }
            return false;
        }
    }
}